public class Student {
//    public  String name;
//    public int age;

    //封装
    private  String name;
    private  int age;

    public static String classRoom="java";

    public Student(){
        System.out.println("不带参数的构造方法");
    }

    public Student(String name,int age){
        this.name=name;
        this.age=age;
        System.out.println("带两个参数的构造方法");
    }
    public Student(String name){
        this.name=name;

    }
    public void doClass(){
        System.out.println(this.name+"上课");
    }


//set,get方法
//    public  void setName(String name){
//        this.name=name;
//    }
//    public String getName(){
//        return this.name;
//    }
//
//
//    public void  setAge(int age){
//        this.age=age;
//    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
